﻿<Window x:Class="BlobFileExtractor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:Controls="clr-namespace:WpfWizard.Controls"
		xmlns:blobFileExtractor="clr-namespace:BlobFileExtractor"
		Title="MainWindow" Height="650" Width="525" ResizeMode="NoResize">

    <Window.Resources>
        <Style TargetType="Border" x:Key="{x:Static Controls:Wizard.HeaderPanelBorderResourceKey}">
            <Setter Property="Background" Value="#F0F0F0" />
            <Setter Property="BorderBrush" Value="#A0A0A0" />
            <Setter Property="BorderThickness" Value="0,0,0,1" />
            <Setter Property="Padding" Value="5" />
        </Style>

        <Style TargetType="Border" x:Key="{x:Static Controls:Wizard.SideHeaderPanelBorderResourceKey}">
            <Setter Property="Background" Value="#F0F0F0" />
            <Setter Property="BorderBrush" Value="#A0A0A0" />
            <Setter Property="BorderThickness" Value="0,0,1,0" />
        </Style>

        <Style TargetType="Border" x:Key="{x:Static Controls:Wizard.ContentPanelBorderResourceKey}">
            <Setter Property="Background" Value="#F0F0F0" />
        </Style>
    </Window.Resources>

    <Grid>
		<Controls:Wizard x:Name="Wizard" CancelClick="Wizard_CancelClick" FinishClick="Wizard_FinishClick" NextClick="Wizard_NextClick" 
						 PageChanged="Wizard_PageChanged">
			<Controls:Wizard.WizardPages>

				<Controls:WizardPage x:Name="ConnectionDetails">
					<Controls:WizardPage.Header>
						<StackPanel>
							<Label FontSize="18" FontWeight="Bold" Content="BLOB File Extractor" />
						</StackPanel>
					</Controls:WizardPage.Header>

					<StackPanel Margin="20,20,20,20">

						<Border Margin="0,0,0,0" VerticalAlignment="Top">
							<StackPanel>
								<TextBlock Text="Connection String:"></TextBlock>
								<StackPanel Orientation="Horizontal">
									<TextBox x:Name="ConnectionStringTb" Width="435" Text="{Binding ConnectionString}"></TextBox>
									<Button x:Name="BuildConnStringBtn" Width="20" Click="BuildConnStringBtn_Click">
										<TextBlock Text="..."></TextBlock></Button>
								</StackPanel>
							</StackPanel>
						</Border>

						<Border Margin="0,20,0,0" VerticalAlignment="Top">
							<StackPanel>
								<TextBlock Text="SQL"></TextBlock>
								<TextBox AcceptsReturn="True" x:Name="SqlTb" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" Height="400" 
										 Text="{Binding SQL}"></TextBox>
							</StackPanel>
						</Border>

					</StackPanel>
				</Controls:WizardPage>

				<Controls:WizardPage x:Name="QueryResults" CanFinish="False">
					<Controls:WizardPage.Header>
						<StackPanel>
							<Label FontSize="18" FontWeight="Bold" Content="BLOB File Extractor" />
						</StackPanel>
					</Controls:WizardPage.Header>

					<blobFileExtractor:OutputLocationView />
					
				</Controls:WizardPage>

				<Controls:WizardPage x:Name="WriteFileResults" CanFinish="True">
					<StackPanel>
						<Border Margin="10,10,10,10" VerticalAlignment="Top">
							<TextBlock x:Name="SuccessMessage" Text="Your file has been written successfully." FontSize="14" Visibility="Hidden"></TextBlock>
						</Border>
					</StackPanel>
				</Controls:WizardPage>

			</Controls:Wizard.WizardPages>
		</Controls:Wizard>

	</Grid>
</Window>
